home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000112_icon-group-sender _Tue Dec 8 13:08:05 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA01594
for icon-group-addresses; Tue, 8 Dec 1998 13:07:54 -0700 (MST)
Message-Id: <199812082007.NAA01594@baskerville.CS.Arizona.EDU>
Date: Tue, 8 Dec 1998 10:30:57 -0700
From: swampler@noao.edu (Steve Wampler)
Subject: Re: Past Keyword / Coexpr Help
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
MJE wrote:
>
>
> What everyone is missing about procedures-that-do-the-job is the speed
> consideration. Think about embedding either procedure in a deep inner
> loop of some kind. At that point, it is much preferable to have a
> keyword, which
>
> (a) avoids any overhead of procedure calling, (b) doesn't have to both
> find and then match the same text (redundancy), (c) simplifies the code
> readability
>
> So with Clint I must say that the keyword is still a good idea.
>
> Thanks for the advice however, it gets me off the dime.
Uh, you don't mean a keyword, you mean a 'built-in' function. You still
have the overhead of procedure calling - there is no difference in the
call to a user-supplied procedure and a built-in. You do gain some
improvement by implementing past() in C (as a built-in), but you may be
surprised at how small that improvement really is! (There are likely to
be other factors that dominant the overall time.)
Also, Nevin's solution avoids the redundant match, and either solution
is called in exactly the same way as a built-in past() would be, so the
code readability can't be much different.
What might be nice is to develop an IPL 'pack' of useful string analysis
procedures, then see which ones might be considered candidates for
speed improvements by recoding in C - after gaining experience with their
use.
--
Steve Wampler - swampler@gemini.edu [Gemini 8m Telescopes Project (under AURA)]
The gods that smiled at your birth are now laughing openly. (Fortune Cookie)